home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc302emb.zip / LIBCF / PEEK.ASM < prev    next >
Assembly Source File  |  1994-03-18  |  444b  |  27 lines

  1. *
  2. * Read a byte from memory: peek(addr)
  3. *
  4. peek    LDI    2,S        Get address
  5.     LDB    I        Get value
  6.     RET
  7. *
  8. * Read a word from memory: peekw(addr)
  9. *
  10. peekw    LDI    2,S        Get address
  11.     LD    I        Get value
  12.     RET
  13. *
  14. * Write a byte to memory: poke(addr, value)
  15. *
  16. poke    LDI    4,S        Get address
  17.     LD    2,S        Get value
  18.     STB    I        Write byte
  19.     RET
  20. *
  21. * Write a word to memory: pokew(addr, value)
  22. *
  23. pokew    LDI    4,S        Get address
  24.     LD    2,S        Get value
  25.     ST    I        Write byte
  26.     RET
  27.